<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>6.井字loading动画</title>
  </head>
  <link rel="stylesheet" href="../common.css" />
  <style>
    :root {
      --c1: orange;
      --c2: skyblue;
      --c3: #b4e1b4;
      --c4: #f83d3d;
    }
    .loading {
      position: relative;
      width: 100px;
      height: 100px;
      transform: rotate(165deg);
    }

    .loading:before,
    .loading:after {
      content: "";
      position: absolute;
      top: 50%;
      left: 50%;
      display: block;
      width: 10px;
      height: 10px;
      border-radius: 5px;
      transform: translate(-50%, -50%);
    }

    .loading:before {
      animation: before8 2s infinite;
    }

    .loading:after {
      animation: after6 2s infinite;
    }

    @keyframes before8 {
      0% {
        width: 5px;
        box-shadow: 10px -5px rgba(225, 20, 98, 0.75),
          -10px 5px rgba(111, 202, 220, 0.75);
      }

      35% {
        width: 30px;
        box-shadow: 0 -5px rgba(225, 20, 98, 0.75),
          0 5px rgba(111, 202, 220, 0.75);
      }

      70% {
        width: 5px;
        box-shadow: -10px -5px rgba(225, 20, 98, 0.75),
          10px 5px rgba(111, 202, 220, 0.75);
      }

      100% {
        box-shadow: 10px -5px rgba(225, 20, 98, 0.75),
          -10px 5px rgba(111, 202, 220, 0.75);
      }
    }

    @keyframes after6 {
      0% {
        height: 5px;
        box-shadow: 5px 10px rgba(61, 184, 143, 0.75),
          -5px -10px rgba(233, 169, 32, 0.75);
      }

      35% {
        height: 30px;
        box-shadow: 5px 0 rgba(61, 184, 143, 0.75),
          -5px 0 rgba(233, 169, 32, 0.75);
      }

      70% {
        height: 5px;
        box-shadow: 5px -10px rgba(61, 184, 143, 0.75),
          -5px 10px rgba(233, 169, 32, 0.75);
      }

      100% {
        box-shadow: 5px 10px rgba(61, 184, 143, 0.75),
          -5px -10px rgba(233, 169, 32, 0.75);
      }
    }
  </style>
  <body>
    <div class="loading"></div>
  </body>
</html>
